package pack

import (
	"net/http"

	"douyin/models"

	"github.com/gin-gonic/gin"
)

// ResponseError 通用错误
func ResponseError(c *gin.Context, code models.ResCode) {
	c.JSON(http.StatusOK, &models.Response{
		StatusCode: code,
		StatusMsg:  code.Msg(),
	})
}

// ResponseSuccess 通用成功
func ResponseSuccess(c *gin.Context, code models.ResCode) {
	c.JSON(http.StatusOK, &models.Response{
		StatusCode: code,
		StatusMsg:  code.Msg(),
	})
}
